﻿using BigEgg.Framework.UnitTesting;
using FMStudio.Documents.Test;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.IO;

namespace FMStudio.Document.Test
{
    [TestClass]
    public class DocumentTest
    {
        public string TestPath = Path.Combine(Environment.CurrentDirectory, "Test.test");

        [TestMethod]
        public void ModifyTest()
        {
            MockDocumentType documentType = new MockDocumentType("Test Documents", ".test");
            MockDocument document = documentType.New(TestPath);

            Assert.IsTrue(document.IsModified);
            AssertHelper.PropertyChangedEvent(document, x => x.IsModified, () => document.IsModified = false);
            Assert.IsFalse(document.IsModified);
        }
    }
}
